<?php 
//Xử lý xóa
if(isset($_POST['XOA']))
{
	$id=$_POST['id'];
	$sql="DELETE FROM us_admin WHERE id='$id'";
	mysql_query($sql);
	header("Location: index.php?option=admin");
}
if(isset($_POST['HUY']))
{
	header("Location: index.php?option=admin");
}
//Xử lý thêm tin
if(isset($_POST['DANG']))
{
	$user_name=$_POST['user_name'];
	$password=md5($_POST['password']);
	
	$states=$_POST['states'];
	$email=$_POST['email'];
	$sdt=$_POST['sdt'];
	$gioitinh=$_POST['gioitinh'];
	
	$sqlinsert="INSERT INTO  us_admin(user_name,password,email,states,sdt,gioitinh)
	VALUES('$user_name','$password','$email','$states','$sdt','$gioitinh')";
	mysql_query("SET NAMES utf8");
	mysql_query($sqlinsert);
///upload hình
	header("Location: index.php?option=admin");
}
if(isset($_POST['rs']))
{
	header("Location: index.php?option=admin&cat=add");
}
?>